﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Scala.Data.Impl
{
    public class SessionProvider : ISessionProvider
    {
        IConfigurator configurator;

        public SessionProvider(IConfigurator configurator)
        {
            if (configurator == null) throw new NullReferenceException("configurator");
            this.configurator = configurator;
        }

        #region ISessionProvider Members

        public NHibernate.ISession CurrentSession
        {
            get { return configurator.GetSession(); }
        }

        #endregion
    }
}
